package com.tsl.prevention.util.webSockek;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

@org.springframework.stereotype.Controller()
@RequestMapping("/index")
public class SendMQController {

    @Autowired
    private RabbitTemplate rabbitTemplate;
    @RequestMapping("/index")
    public String index() {
        return "index";
    }

    @RequestMapping("/send")
    public String send() {
        String exchange = "testss";
        String queue = "hello";
        rabbitTemplate.convertAndSend(exchange,queue,"hello");
        return "success";
    }


}
